home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / Wipeout / source / allocator.h < prev    next >
C/C++ Source or Header  |  2001-02-06  |  2KB  |  52 lines

  1. /*
  2.  * $Id: allocator.h 1.8 1998/04/16 09:31:31 olsen Exp olsen $
  3.  *
  4.  * :ts=4
  5.  *
  6.  * Wipeout -- Traces and munges memory and detects memory trashing
  7.  *
  8.  * Written by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
  9.  * Public Domain
  10.  */
  11.  
  12. #ifndef _ALLOCATOR_H
  13. #define _ALLOCATOR_H 1
  14.  
  15. /****************************************************************************/
  16.  
  17. /* memory allocation types */
  18. enum
  19. {
  20.     ALLOCATIONTYPE_AllocMem,
  21.     ALLOCATIONTYPE_AllocVec,
  22.     ALLOCATIONTYPE_AllocPooled
  23. };
  24.  
  25. /****************************************************************************/
  26.  
  27. struct TrackHeader
  28. {
  29.     struct MinNode            th_MinNode;        /* for linking to a pool list */
  30.     struct PoolHeader *        th_PoolHeader;    /* the memory pool the allocation belongs to */
  31.  
  32.     ULONG                    th_Magic;        /* 0xBA5EBA11 */
  33.     struct TrackHeader *    th_PointBack;    /* points to beginning of header */
  34.     struct Task *            th_Owner;        /* address of allocating task */
  35.     WORD                    th_OwnerType;    /* type of allocating task (task/process/CLI program) */
  36.     BOOL                    th_ShowPC;        /* When dumping this entry, make sure that the PC is shown, too. */
  37.     LONG                    th_NameTagLen;    /* if non-zero, name tag precedes header */
  38.     ULONG                    th_PC;            /* allocator return address */
  39.     struct timeval            th_Time;        /* when the allocation was made */
  40.     ULONG                    th_Sequence;    /* unique number */
  41.     ULONG                    th_Size;        /* number of bytes in allocation */
  42.     ULONG                    th_Checksum;    /* protects the entire header */
  43.     UBYTE                    th_Type;        /* type of the allocation (AllocMem/AllocVec/AllocPooled) */
  44.     UBYTE                    th_FillChar;    /* wall fill char */
  45.     UWORD                    th_PostSize;    /* size of post-allocation wall */
  46.     LONG                    th_Marked;        /* TRUE if this allocation was marked for later lookup */
  47. };
  48.  
  49. /****************************************************************************/
  50.  
  51. #endif /* _ALLOCATOR_H */
  52.